﻿using OMG.Fill.Frunit.Model.Ent;
using OMG.Fill.Frunit.Services;
using ProjectShare;
using System.Collections.Generic;
using System.Web.Http;
namespace OMG.Fill.Frunit.Model.UI.Controllers
{
    public class SetListController : ApiController
    {
        SetListServices setListServices = new SetListServices();

        //[ApiActionAuthorize("获取填报项目设置T_Set_List分页列表对象操作")]
        //[ApiActionException]
        public Pager<List<SetListEntity>> PostPageList(SetListQuery query)
        {
            return setListServices.GetPageList(query);
        }
        //[ApiActionAuthorize("新增填报项目设置T_Set_List指定对象操作")]
        //[ApiActionException]
        public ResResult<int> Post(SetListEntity model)
        {
            return setListServices.AddInfo(model);
        }
        //[ApiActionAuthorize("修改填报项目设置T_Set_List指定对象操作")]
        //[ApiActionException]
        public ResResult<int> Put(SetListEntity model)
        {
            return setListServices.UpdateInfo(model);
        }
        //[ApiActionAuthorize("删除填报项目设置T_Set_List指定对象操作")]
        //[ApiActionException]
        public ResResult<int> Delete(string id)
        {
            return setListServices.DeleteInfo(id);
        }
        //[ApiActionAuthorize("获取填报项目设置T_Set_List指定对象操作")]
        //[ApiActionException]
        public ResResult<SetListEntity> Get(string id)
        {
            return setListServices.GetModel(id);
        }
        public ResResult<List<SortSetItem>> GetSearchList(string tableCode)
        {
            return setListServices.GetSearchList(tableCode);
        }
    }
}